home *** CD-ROM | disk | FTP | other *** search
/ Apple Macintosh CD: Power Macintosh 5200/75 / Apple Macintosh CD - Power Macintosh 5200_75.7z / Apple Macintosh CD - Power Macintosh 5200_75.bin / Extras / PowerTalk Extras / PowerTalk Mail Gateways / STF PowerFax™ PE Gateway / PowerFax™ PE Installer / STFApplications.sit / ARA Scripts / Rockwell 2400 (LnMgr) < prev    next >
Text File  |  1994-07-11  |  2KB  |  161 lines

  1. ! "Zoom 2400 bps (V.22bis)"
  2. ! This script has been verified to work with Line Manager
  3. !
  4. @ORIGINATE
  5. @ANSWER
  6. !
  7. @LABEL 1
  8. serreset 2400, 0, 8, 1
  9. !
  10. ! first recall the factory configuration
  11. !
  12. matchclr
  13. settries 0
  14. matchstr 1 3 "OK\13\10"
  15. @LABEL 2
  16. write "AT&F\13"
  17. matchread 30
  18. inctries
  19. iftries 2 59
  20. jump 2
  21. !
  22. ! Next, Set up the configuration: Echo off, direct mode, reset on DTR transistion
  23. !
  24. @LABEL 3
  25. matchstr 1 5 "OK\13\10"
  26. write "ATE0&Q0&D3\13"
  27. matchread 30
  28. jump 59
  29. !
  30. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  31. !
  32. @LABEL 5
  33. matchclr
  34. ifstr 2 8 "1"
  35. matchstr 1 8 "OK\13\10"
  36. write "ATM0\13"
  37. matchread 30
  38. jump 59
  39. !
  40. ! The modem is ready.  So enable answering, or originate a call
  41. !
  42. @LABEL 8
  43. ifANSWER 30
  44. note "Dialing ^1" 3
  45. write "ATDT^1\13"
  46. !
  47. @LABEL 9
  48. matchstr  1 11 "CONNECT 1200\13\10"
  49. matchstr  2 12 "CONNECT 2400\13\10"
  50. matchstr  3 50 "NO CARRIER\13\10"
  51. matchstr  4 50 "ERROR\13\10"
  52. matchstr  5 52 "NO DIALTONE\13\10"
  53. matchstr  6 53 "BUSY\13\10"
  54. matchstr  7 54 "NO ANSWER\13\10"
  55. matchread 700
  56. jump 59
  57. !
  58. @LABEL 11
  59. note "Communicating at 1200 bps." 2
  60. serreset 1200, 0, 8, 1
  61. jump 16
  62. !
  63. @LABEL 12
  64. note "Communicating at 2400 bps." 2
  65. setspeed 2400
  66. jump 16
  67. !
  68. @LABEL 16
  69. ifANSWER 17
  70. pause 30
  71. @LABEL 17
  72. exit 0
  73. !
  74. ! @ANSWER
  75. ! Set up the modem to answer
  76. @LABEL 30
  77. write "ATS0=1\13"
  78. matchstr 1 31 "OK\13\10"
  79. matchread 30
  80. jump 59
  81. !
  82. @LABEL 31
  83. matchstr 1  32 "RING\13\10"
  84. matchstr 2  11 "CONNECT 1200\13\10"
  85. matchstr 3  12 "CONNECT 2400\13\10"
  86. matchstr 4  50 "NO CARRIER\13\10"
  87. matchstr 5  50 "ERROR\13\10"
  88. matchstr 6  52 "NO DIALTONE\13\10"
  89. matchstr 7  53 "BUSY\13\10"
  90. matchstr 8  54 "NO ANSWER\13\10"
  91. matchread 700
  92. jump 31
  93. !
  94. @LABEL 32
  95. userhook 1
  96. note "Answering phone…" 2
  97. jump 31
  98. !
  99. ! 50: error messages
  100. !
  101. @LABEL 50
  102. exit -6021
  103. !
  104. @LABEL 52
  105. exit -6020
  106. !
  107. @LABEL 53
  108. exit -6022
  109. !
  110. @LABEL 54
  111. exit -6023
  112. !
  113. @LABEL 59
  114. exit -6019
  115. !
  116. ! Hang up the modem
  117. !
  118. @HANGUP
  119. @LABEL 60
  120. settries 0
  121. @LABEL 61
  122. write "ATH0\13"
  123. matchclr
  124. matchstr 1 64 "OK\13\10"
  125. matchstr 2 64 "NO CARRIER\13\10"
  126. matchstr 3 64 "ERROR\13\10"
  127. matchread 15
  128. inctries
  129. iftries 3 59
  130. ! no response, try escape sequence
  131. write "+++"
  132. matchclr
  133. matchstr 1 62 "OK\13\10"
  134. matchread 18
  135. !
  136. ! No response from modem, toggle DTR
  137. !
  138. DTRClear
  139. pause 10
  140. DTRSet
  141. jump 61
  142. !
  143. @LABEL 62
  144. matchclr
  145. matchstr 1 64 "OK\13\10"
  146. matchstr 2 64 "NO CARRIER\13\10"
  147. write "ATH0\13"
  148. matchread 50
  149. jump 61
  150. !
  151. ! Recall the factory settings
  152. !
  153. @LABEL 64
  154. matchclr
  155. matchstr 1 65 "OK\13\10"
  156. write "AT&F\13"
  157. matchread 30
  158. !
  159. @LABEL 65
  160. exit 0
  161.